<?php
namespace app\admin\model;


use app\model\Base;

class UserRechargeLog extends Base
{
    public function getModeFormatAttr($value, $data)
    {
        $str = $data['mode'] == 'inc' ? '充值' : '扣除';
        return $str;
    }

    public function getBeforeFormatAttr($value, $data)
    {
        return bcdiv_amount($data['before']);
    }

    public function getAmountFormatAttr($value, $data)
    {
        return bcdiv_amount($data['amount']);
    }

    public function getAfterFormatAttr($value, $data)
    {
        return bcdiv_amount($data['after']);
    }

    public function getAliasFormatAttr($value, $data)
    {
        return Base::$walletTypeArray[$data['alias']];
    }
}